// export const increment = ({ commit }) => {
//   commit('increment')
// }
// export const decrement = ({ commit }) => {
//   commit('decrement')
// }
// export const incrementIfOdd = ({ commit, state }) => {
//   if ((state.count + 1) % 2 === 0) {
//     commit('increment')
//   }
// }
// export const incrementAsync = ({ commit }) => {
//   setTimeout(() => {
//     commit('increment')
//   }, 1000)
// }
// export const setHeadNavAction = (context, data) => {
//   context.commit("setHeadNav", data);
// };
import { switchIdentity as switchIdentityApi } from "@/api/api.js";
export const switchIdentity = ({ commit }, data) => switchIdentityApi(data).then(({ code }) => code === 0);
